package com.ruoyi.project.system.service.impl;

import com.ruoyi.project.system.domain.SysCexpense;
import com.ruoyi.project.system.mapper.SysCexpeMapper;
import com.ruoyi.project.system.service.SysCexpeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author :sxt
 * @dote :21:41 2021/7/16
 */
@Service
public class SysCexpeServiceImpl implements SysCexpeService {

    @Autowired
    private SysCexpeMapper sysCexpeMapper;

    /**
     * 查询所有检查项目费用，要项目类别
     * @return
     */
    @Override
    public List<SysCexpense> getCexpenseSort() {
        return sysCexpeMapper.selectAllSort();
    }
    /**
     * 分页查询List
     * @param sysCexpense  模糊查询
     * @return
     */
    @Override
    public List<SysCexpense> getList(SysCexpense sysCexpense) {
        return sysCexpeMapper.selectList(sysCexpense);
    }

    /**
     * 根据指定ID查询检查项目费用信息
     * @param scId
     * @return
     */
    @Override
    public SysCexpense getCeById(Integer scId) {
        return sysCexpeMapper.selectCeById(scId);
    }

    /**
     * 增加检查项目信息
     * @param sysCexpense
     * @return
     */
    @Override
    public int addCexpense(SysCexpense sysCexpense) {
        return sysCexpeMapper.addCexpense(sysCexpense);
    }


    /**
     * 修改检查项目信息
     * @param sysCexpense
     * @return
     */
    @Override
    public int updateCexpense(SysCexpense sysCexpense) {
        return sysCexpeMapper.updateCexpense(sysCexpense);
    }

    /**
     * 删除检查费用信息
     * @param scIds  是要删除的记录的id，是个数组，支持批量删除
     * @return
     */
    @Override
    public int removeCexpense(Integer[] scIds) {
        return sysCexpeMapper.removeCexpense(scIds);
    }
}
